package com.training.java.core.collections.post15;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class EntrySetDemo {

	public static void main(String[] args) {

		Map<String, String> directory = new HashMap<String, String>();

		directory.put("Sushil", "Orange");
		directory.put("Siva", "Grapes");
		directory.put("Satya", "Apple");
		directory.put("Ravi", "Banana");
		directory.put("Reenu", "Pear");
		directory.put("Henry", "WaterMelon");
		directory.put("Ronnie", "Orange");
		directory.put("Mytri", "Kiwi");
		directory.put("Susmita", "melon");

		Set<Map.Entry<String, String>> entries = directory.entrySet();

		for (Map.Entry<String, String> entry : entries) {

			String key = entry.getKey();
			String value = entry.getValue();

			System.out.println("Key is =  " + key + "   Value  =  " + value);

		}

	}

}
